import { Button, Modal } from "antd";
import { ModalProps } from 'antd';
import CommonModal from "./CommonModal";

type Props = {
  showCancelBtn?: boolean;
  showOkBtn?: boolean;
} & ModalProps;

const DeleteModal = ({ open, onOk, onCancel, title  }: Props) => {
  return (
    <CommonModal showCancelBtn={false} showOkBtn={false} open={open} width={'360px'}>
      <div className='flex flex-col justify-center items-center' style={{ height: '120px' }}>
        <div className='text-lg mt-4'>
         {title || '确定要删除吗？'}
        </div>
        <div className='flex justify-betwee mt-10'>
          <Button style={{ height: '40px', width: '100px', borderRadius: '20px' }}
            onClick={onCancel}>取消</Button>
          <Button className='ml-5'
            style={{ backgroundColor: '#FF4949', color: '#fff', height: '40px', width: '100px', borderRadius: '20px' }}
            onClick={onOk}>删除</Button>
        </div>
      </div>
    </CommonModal>
  );
};

export default DeleteModal;
